The present invention relates generally to integrated circuit design, and more particularly, to a bidirectional shift register design.
In digital circuit, a shift register is a group of flip-flops set up in a linear fashion where an output of a flip-flop is connected to an input of a next flip-flop. Therefore data are shifted down the line when the shift register is activated. Shift register is wildly used in integrated circuits. One application is for programming or reading out electrical fuses, where data intended to be programmed into the electrical fuses are serially clocked in a shift register. Data stored in the electrical fuses are first read to the shift register and then serially clocked out.
FIG. 1 shows a conventional unidirectional first-in-first-out (FIFO) shift register 100, which comprises, for illustration purpose, four flip-flops K[0:3]. Node D and Q designate input and output terminals, respectively, of the flip-flop K[i], where 0≦i≦3. As shown in FIG. 1, an output of the flip-flop K[i] is connected to an input of a next flip-flop K[i+1]. A clock signal CLK is coupled to every flip-flop K[0:3]. Upon an activation of the clock signal CLK, data will be shifted one bit to the right, i.e., DIN to K[0], K[0] to K[1], K[1] to K[2] and K[2] to K[3]. Data at K[3] is shifted out to DOUT upon an activation of the clock signal CLK. Apparently data being first shifted in will be shifted out first.
Alternatively, a series of flip-flops can be organized in a last-in-first-out (LIFO) fashion. In certain applications, both FIFO and LIFO, i.e. bidirectional, may be required of a shift register. In such applications, a conventional circuit is to include both FIFO and LIFO functional circuits with a control signal switching the shift register between the two functions. However, since the conventional bidirectional shift register requires two sets of flip-flops to perform such bidirectional shifting functions, a transistor count of such conventional bidirectional shift register will be at least doubled. When the number of bits of the bidirectional shift register becomes large, the additional transistors will occupy a significant amount of chip area, which results in a cost increase. As such, what is desired is a bidirectional shift register requiring only a small amount of additional circuits over unidirectional shift registers.